Obtain hostname and fqdn Based on Python Shell.
Linux's hostname and fqdn (Fully Qualified Domain Name) have been confusing for a long time. Today we are dedicated to figuring out their usage details.
1. Set hostname/fqdn
Setting hostname in Linux is very easy, for example:
$ Hostname florian
If you want to set
Linux hostname and fqdn (FullyQualifiedDomainName) have been confused for a long time. Today, I will use the script home platform to find out their usage details and share them with you the Linux hostname and fqdn (Fully Qualified Domain Name) I have been confused for a long time. Today I am taking the time to find out the details of their use.
1. Set hostname/fqdn
fqdnfully qualified domain name abbreviation, meaning complete domain name.
For example, the console hostname (hostname) www, domain suffix (field) example.com, the host FQDN should be www.example.com. Question, in fact the FQDN "."
At the end, the application server allows you to ignore points. Linux allows users to view and set host names through the hostna
Many applications will involve FQDNsWhat is the difference between a fqnd and a host that the salt gets to be different?The FQDNYou can ' t change the FQDN (as returned by hostname--fqdn) or the DNS domain name (as returned by DnsDomainName) with this Command. The FQDN ofThe system is the name of the resolver (3) returns for the host name.The Technically:the
The Linux hostname and FQDN (Fully qualified Domain Name) have been confusing for a long time, and today they are dedicated to figuring out the details of their use.First, set Hostname/fqdnSetting up hostname in a Linux system is simple, such as:$ hostname florianIf you want to set the FQDN, you need to configure the/etc/hosts.$ cat /etc/hosts127.0.0.1 localhost192.168.1.1 florian.test.com florianThe format
FQDN refers to FullQualifiedDomainName. On a Linux host, you must set the/etc/hostname and/etc/hosts files. For example, add a line 10.150.140.103gitlab.bigdata.letv.cngitlab to the/etc/hostname server of my new configuration with gitlab/etc/hosts under
FQDN refers to Full Qualified Domain Name. On a Linux host, you need to set the/etc/hostname and/etc/hosts fil
For some type of setups, if network connections not available during startup process, exim4 takes long time to start. To solve this problem, you must useDC_minimaldnsOption of exim4. you can also configure this feature
Dpkg-reconfigure exim4-config
On Debian based systems. You shoshould answerYesFor the question"Keep number of DNS-queries minimal?"
However, ifHostname -- fqdnCommand doesn't print a full qualified hostname (actually only checked one dot) exim4 gives a warning and dc_minimaldns f
The FQDN is the abbreviation for fully qualified domain name, meaning the full domain name. For example, if a machine hostname (hostname) is www and the domain suffix is example.com, the FQDN of the host should be www.example.com. In addition, the FQDN is in fact the "." To the end, but most applications and servers al
In the past, we had to set up the email system. Currently, the complete FQDN name must be set for Puppet. Different operating systems are different. View [root @ rdo ~] # Hostnamewww [root @ rdo ~] # Hostname-fwww.server110.com to achieve this effect, you need to modify the two files to edit/etc/sysconfig/ne before engaging in the mail system, this is the content that must be set. Currently, the complete FQDN
Set hostname#
In fact I am also curious about why VPS needs to be set hostname. The estimate is for attractiveness, or portability. For example, before setting, hostname-v display is li-memeberxxx and so on, set up, the host name appears personalized, another change server, host name will not change-this is just my guess.OpenSUSE setting hostname is slightly closer to the Ubuntu section in the Linode tutorial:sudo vi/etc/hostname– creates a hostname
1. vim/etc/httpd/conf.d/vhost1.conf Create the Vhost1.conf file and enter the following contentServerName www1.magedu.comDocumentroot/data/vhosts/www1Customlog Logs/www1-access_log combined2. vim/etc/httpd/conf.d/vhost2.conf Create the Vhost2.conf file and enter the following contentServerName www1.magedu.comDocumentroot/data/vhosts/www1Customlog Logs/www2-access_log combinedUsing HTTPD-T to detect syntax with or without errors3. Another machine edit etc/hosts fileSettings: 192.168.1.28 www1.mag
A virtual host can coexist with multiple sites. When the site has little traffic, multiple sites can run on one physical host to save resources (IP addresses and physical hosts.
1. IP-based VM:
To implement a VM, you must first comment out the configuration of the central host, that is, disable the central host. You only need to comment out the line corresponding to the DocumentRoot command, and then define the VM.
IP-based virtual hosts require that one physical machine have multiple IP addres
View
Copy Code code as follows:
[Root@rdo ~]# hostname
Rdo
[Root@rdo ~]# Hostname-f
Rdo.test.com
To achieve this effect, you need to modify two files
Edit/etc/sysconfig/network, you need to join a line, remember hostname, must
Python decorator use example and actual application example, python example
Test 1
Deco is running, but myfunc is not running
Copy codeThe Code is as follows:Def deco (func ):Print 'before func'Return func
Def myfunc ():Print 'myfunc () called'Myfunc = deco (myfunc)
Test 2
Call myfunc in the required deco to executeCopy codeThe Code is as follows:Def deco (func
/*======================================================================
A Globalmem Driver As an example of char device drivers
There are two same globalmems in this driver
This example was to introduce the function of File->private_data
The initial developer of the original code is Baohua Song
======================================================================*/
#include #include #include #include #in
An example of capturing information from another website (domain name query)
If (isset ($ xx )){
$ Dodo = @ file ("http://www.e9china.com/cgi-bin/comdns.pl? Raw = 1 lookup = OK fqdn = ". $ fqdn. " domain = ". $ domain. " root = ". $ root. cdomain = 2.7 ");
$ I = 0;
While ($ dodo [$ I]) {
Echo $ dodo [$ I];
$ I ++;
}
Exit;
}
?>
If (isset ($ submit )){
If ($ do
Remember when a friend wanted his VFP program to run this way: There is no VFP main screen (_screen), the runtime directly on the desktop, a login dialog box, enter the user name and password and verify the software after the main interface, looks like the software written in VB, a very cool feeling.
The main interface of VFP software can usually be implemented in two ways: the main screen (_screen) or the top-level form (or the parent-child form). You can use the top level form to implement th
This example applies to the knowledge of the Between...and clause in the SELECT statement, referring to the SELECT statement: Select SQL command or the SQL language tutorial.
This example runs the following diagram:
This example uses the "Data 1" database "People information table", about the database is already looking at the case of VFP: sample database is
The concept of a single case pattern
A single example pattern is a design pattern in which a class has only one object instance in the entire application. Specifically, as an object creation, the singleton pattern ensures that a class has only one instance, and instantiates it itself and provides this instance to the entire system globally. Instead of creating an instance copy, it returns a reference to an instance stored within a singleton class.
C
Transferred from: http://aigo.iteye.com/blog/2301010Although the official Doc says that the event binding method is exactly the same as multi-cast usage, there are many examples on the Multi-cast forum, but the actual is different. And there is no such example on the forum. Later looked at the next Runtime/core source, the event of the binging manner as follows (attached complete steps):1, first define the custom event, in this case we define in Gamem
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.